<template>
  <div>
    <!-- 编辑体检项目信息弹框 -->
    <el-dialog
      title="编辑体检项目信息"
      :visible.sync="dialogFormcontent"
      :append-to-body="true"
      width="1000px"
      class="top_dialog"
      :show-close="false"
    >
      <el-form :model="form" label-position="left">
        <div class="add_info">
          <div class="info_l">
            <div class="info_l_head">
              <!-- <el-form-item
                class=""
                label="部门信息"
                :label-width="formLabelWidth"
              >
                <el-select
                  class="form_select"
                  style="width: 40%"
                  v-model="form.region"
                  size="medium"
                  placeholder="部门"
                >
                  <el-option label="人事" value="shanghai"></el-option>
                  <el-option label="财务" value="shanghai"></el-option>
                </el-select>
              </el-form-item> -->
              <p style="font-size: 20px">项目名称-> {{ form.contentName }}</p>
              <el-divider></el-divider>
            </div>
            <div>
              <el-form-item label="内容名称" :label-width="formLabelWidth">
                <el-input
                  v-model="form.contentName"
                  autocomplete="off"
                ></el-input>
              </el-form-item>
              <div class="dialog_flex">
                <div>
                  <el-form-item label="计量单位" :label-width="formLabelWidth">
                    <el-input
                      v-model="form.units"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </div>
                <div class="margin_left">
                  <el-form-item label="编码" :label-width="formLabelWidth">
                    <el-input
                      v-model="form.defautValue"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </div>
                <div class="margin_left">
                  <el-form-item label="显示序号" :label-width="formLabelWidth">
                    <el-input
                      v-model="form.sequence"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </div>
              </div>
              <div class="dialog_flex">
                <div>
                  <el-form-item
                    label="正常参考值"
                    :label-width="formLabelWidth"
                  >
                    <el-input
                      v-model="form.minValue"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </div>
                <div class="margin_left">
                  <el-form-item label="——" label-width="40px">
                    <el-input
                      v-model="form.maxValue"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </div>
              </div>

              <div class="dialog_flex">
                <div>
                  <el-form-item :label-width="formLabelWidth" label="上下限值">
                    <el-input
                      v-model="form.minLimit"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </div>
                <div class="margin_left">
                  <el-form-item label="——" label-width="40px">
                    <el-input
                      v-model="form.maxLimit"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                </div>
                <div class="margin_left"></div>
              </div>
              <div></div>
              <el-form-item label="是否启用">
                <el-checkbox-group v-model="form.status">
                  <el-checkbox
                    class="info_sel_r_group"
                    label=""
                    name="type"
                  ></el-checkbox>
                </el-checkbox-group>
              </el-form-item>
              <div>
                <el-button type="primary">保存并继续</el-button>
              </div>
            </div>
          </div>
        </div>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="hidelogs()">保 存</el-button>
        <el-button @click="hidelogs()">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script lang="ts">
import Vue from "vue";

export default {
  components: {},
  data() {
    return {
      formLabelWidth: "80px",
      form: {
        type: [],
        status: 0,
      },
    };
  },
  created() {
    this.form = this.project;
  },
  props: {
    dialogFormcontent: {
      type: Boolean,
      default: true,
    },
    project: {
      type: Object,
    },
  },
  methods: {
    hidelogs() {
      this.$emit("hidelog", this.form);
    },
  },
};
</script>

<style scoped>
.el_tab {
  margin-top: 20px;
}
.add_info {
  display: flex;
  padding: 0px 90px;
}
.info_l {
  text-align: left;
  flex: 1;
}
.info_r {
  width: 50%;
  text-align: left;
  flex: 1;
  margin-left: 30px;
}
.info_sel {
  display: flex;
}
.info_sel_r {
  margin-left: 20px;
}
.top_dialog /deep/ .el-dialog__body {
  padding: 0px !important;
}
.block {
  text-align: center;
  margin-top: 10px;
  /* margin:0px auto; */
}
.dialog_flex {
  display: flex;
}
.dialog_flex_r {
  margin-left: 20px;
}
.info_sel_r_group {
  margin-left: 10px;
}
.top_dialog {
  z-index: 9999 !important;
}
.top_dialog /deep/ .el-dialog {
  margin-top: 5vh !important;
}
.margin_left {
  margin-left: 10px;
}
</style>